local NotificationHolder = loadstring(game:HttpGet("https://raw.githubusercontent.com/BocusLuke/UI/main/STX/Module.Lua"))() 
local Notification = loadstring(game:HttpGet("https://raw.githubusercontent.com/BocusLuke/UI/main/STX/Client.Lua"))() 
Notification:Notify( 
     {Title = "UI界面已加载", Description = "作者：思绪"}, 
     {OutlineColor = Color3.fromRGB(80, 80, 80),Time = 5, Type = "image"}, 
     {Image = "http://www.roblox.com/asset/?id=4483345998", ImageColor = Color3.fromRGB(255, 84, 84)} 
)

-- ==================== 基础变量和函数 ====================
local Players = game:GetService("Players")
local lp = Players.LocalPlayer
local mouse = lp:GetMouse()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TextChatService = game:GetService("TextChatService")
local StarterGui = game:GetService("StarterGui")
local TweenService = game:GetService("TweenService")

-- 安全加载必要的库和模块
local library = nil
local devv = nil
local Signal = nil
local item = nil

-- 尝试加载依赖
pcall(function()
    library = loadstring(game:HttpGet("https://pastefy.app/lhpGk8o3/raw", true))()
    devv = require(game:GetService("ReplicatedStorage").devv)
    Signal = devv.load("Signal")
    item = devv.load('v3item')
end)

-- 全局变量
local speed = 1
local tpEnabled = true
local heartbeatConnection = nil
local character, humanoid, humanoidRootPart
local teleportLoop = nil
local autokill = false
local autostomp = false
local grabplay = false
local hitMOD = "meleepunch"
local qtid = nil
local autoatm = false
local autojia = false
local jiahit = "Light Vest"
local autolok = false
local autouse = false
local autosell = false
local autorem = false
local autocl = false
local autozb = false
local autobank = false
local bxbx = false
local lock = false
local bxgh = false
local mngh = false
local czycj = false
local autobs = false
local autohk = false
local automn = false
local autodj = false
local autojt = false
local autoqq = false
local autoblue = false
local autoluck = false
local antirea = false
local antisit = false
local killoppEnabled = false
local ignoreFriendsEnabled = false
local selectedPlayer = nil
local selectedItem = nil
local isTeleporting = false
local tp666 = false
local zDistance = 3
local yDistance = 0

-- 存储配置
local bai = {
    cuttreeselect = "Generic",
    zlwjia = "",
    zix = 1,
    zlz = 3,
    bringamount = 1,
    bringtree = false,
    waterwalk = false,
    awaysday = false,
    awaysdnight = false,
    nofog = false,
    cswjia = "",
    itemset = nil,
    slot = -1,
    dropdown = {}
}

-- 基础函数
local function notify(Title, Text, Duration)
    game.StarterGui:SetCore("SendNotification", {
        Title = Title;
        Text = Text;
        Icon = nil;
        Duration = Duration
    })
end

local function tp(pos)
    if typeof(pos) == "CFrame" then
        lp.Character:SetPrimaryPartCFrame(pos)
    elseif typeof(pos) == "Vector3" then
        lp.Character:MoveTo(pos)
    end
end

function shuaxinlb(zji)
    bai.dropdown = {}
    if zji == true then
        for p, I in next, game.Players:GetChildren() do
            table.insert(bai.dropdown, I.Name)
        end
    else
        for p, I in next, game.Players:GetChildren() do
            if I ~= lp then
                table.insert(bai.dropdown, I.Name)
            end
        end
    end
end
shuaxinlb(true)

-- 角色设置
local function setupCharacter()
    character = lp.Character
    if character then
        humanoid = character:WaitForChild("Humanoid")
        humanoidRootPart = character:WaitForChild("HumanoidRootPart")
        humanoid.Died:Connect(function()
            repeat task.wait() until lp.Character ~= nil
            setupCharacter()
            if tpEnabled then startTPWalk() end
        end)
    end
end

-- 传送行走
local function startTPWalk()
    if heartbeatConnection then heartbeatConnection:Disconnect() end
    heartbeatConnection = RunService.Heartbeat:Connect(function()
        if not tpEnabled or not character or not humanoid or humanoid.Health <= 0 then return end
        if humanoid.MoveDirection.Magnitude > 0 then
            local currentCFrame = character.PrimaryPart.CFrame
            local newPosition = currentCFrame.Position + (humanoid.MoveDirection * speed)
            character:SetPrimaryPartCFrame(CFrame.new(newPosition) * currentCFrame.Rotation)
        end
    end)
end

local function stopTPWalk()
    if heartbeatConnection then
        heartbeatConnection:Disconnect()
        heartbeatConnection = nil
    end
end

lp.CharacterAdded:Connect(function(newCharacter)
    character = newCharacter
    setupCharacter()
end)
setupCharacter()

-- 封禁信息功能
local function getBanInfo()
    local banReason = "无"
    local banCount = "无"
    local isBanned = false
    local banAt = "无"
    local unbanAt = "无"
    local remainingTime = "无"
    
    pcall(function()
        for _, entry in ipairs(getgc(true)) do
            if type(entry) == "table" then
                local reason = rawget(entry, "shadowbanned")
                if reason then
                    banReason = reason
                    isBanned = true
                end
                local count = rawget(entry, "numshadowbans")
                if count then
                    banCount = tostring(count)
                    isBanned = true
                end
                local at = rawget(entry, "shadowbannedAt")
                if at then
                    banAt = os.date("%Y-%m-%d %H:%M:%S", at)
                end
                local exes = rawget(entry, "shadowbannedExpires")
                if exes then
                    unbanAt = os.date("%Y-%m-%d %H:%M:%S", exes)
                    local now = os.time()
                    local rem = exes - now
                    if rem > 0 then
                        local d = math.floor(rem / 86400)
                        rem = rem % 86400
                        local h = math.floor(rem / 3600)
                        rem = rem % 3600
                        local m = math.floor(rem / 60)
                        rem = rem % 60
                        local s = rem
                        remainingTime = string.format("%d天 %d小时 %d分 %d秒", d, h, m, s)
                    else
                        remainingTime = "已过期"
                    end
                end
            end
        end
    end)
    
    return isBanned, banReason, banCount, banAt, unbanAt, remainingTime
end

-- ==================== 磁浮窗库 ====================
local library = {}
local ToggleUI = false
library.currentTab = nil
library.flags = {}

local services = setmetatable({}, {
    __index = function(t, k)
        return game.GetService(game, k)
    end
})

local mouse = services.Players.LocalPlayer:GetMouse()

function Tween(obj, t, data)
    services.TweenService:Create(obj, TweenInfo.new(t[1], Enum.EasingStyle[t[2]], Enum.EasingDirection[t[3]]), data):Play()
    return true
end

function Ripple(obj)
    spawn(function()
        if obj.ClipsDescendants ~= true then
            obj.ClipsDescendants = true
        end
        local Ripple = Instance.new("ImageLabel")
        Ripple.Name = "Ripple"
        Ripple.Parent = obj
        Ripple.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
        Ripple.BackgroundTransparency = 1.000
        Ripple.ZIndex = 8
        Ripple.Image = "rbxassetid://16785029075"
        Ripple.ImageTransparency = 0.800
        Ripple.ScaleType = Enum.ScaleType.Fit
        Ripple.ImageColor3 = Color3.fromRGB(255, 255, 255)
        Ripple.Position = UDim2.new((mouse.X - Ripple.AbsolutePosition.X) / obj.AbsoluteSize.X, 0, (mouse.Y - Ripple.AbsolutePosition.Y) / obj.AbsoluteSize.Y, 0)
        Tween(Ripple, {.3, 'Linear', 'InOut'}, {Position = UDim2.new(-5.5, 0, -5.5, 0), Size = UDim2.new(12, 0, 12, 0)})
        wait(0.15)
        Tween(Ripple, {.3, 'Linear', 'InOut'}, {ImageTransparency = 1})
        wait(.3)
        Ripple:Destroy()
    end)
end

-- # Switch Tabs # --
local switchingTabs = false
function switchTab(new)
    if switchingTabs then return end
    local old = library.currentTab
    if old == nil then
        new[2].Visible = true
        library.currentTab = new
        services.TweenService:Create(new[1], TweenInfo.new(0.1), {ImageTransparency = 0}):Play()
        services.TweenService:Create(new[1].TabText, TweenInfo.new(0.1), {TextTransparency = 0}):Play()
        return
    end

    if old[1] == new[1] then return end
    switchingTabs = true
    library.currentTab = new

    services.TweenService:Create(old[1], TweenInfo.new(0.1), {ImageTransparency = 0.2}):Play()
    services.TweenService:Create(new[1], TweenInfo.new(0.1), {ImageTransparency = 0}):Play()
    services.TweenService:Create(old[1].TabText, TweenInfo.new(0.1), {TextTransparency = 0.2}):Play()
    services.TweenService:Create(new[1].TabText, TweenInfo.new(0.1), {TextTransparency = 0}):Play()

    old[2].Visible = false
    new[2].Visible = true

    task.wait(0.1)
    switchingTabs = false
end

-- # 修复的拖动功能 # --
function drag(frame, hold)
    if not hold then
        hold = frame
    end
    
    local dragging = false
    local dragInput
    local dragStart
    local startPos

    local function update(input)
        local delta = input.Position - dragStart
        frame.Position = UDim2.new(
            startPos.X.Scale, 
            startPos.X.Offset + delta.X, 
            startPos.Y.Scale, 
            startPos.Y.Offset + delta.Y
        )
    end

    hold.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
            dragging = true
            dragStart = input.Position
            startPos = frame.Position
            
            input.Changed:Connect(function()
                if input.UserInputState == Enum.UserInputState.End then
                    dragging = false
                end
            end)
        end
    end)

    hold.InputChanged:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
            dragInput = input
        end
    end)

    services.UserInputService.InputChanged:Connect(function(input)
        if input == dragInput and dragging then
            update(input)
        end
    end)
end

function library.new(library, name, theme)
    for _, v in next, services.CoreGui:GetChildren() do
        if v.Name == "qing" then
            v:Destroy()
        end
    end
    
    if theme == 'qing' then
        MainColor = Color3.fromRGB(10, 25, 255)
        Background = Color3.fromRGB(10, 25, 255)
        zyColor = Color3.fromRGB(10, 25, 255)
        beijingColor = Color3.fromRGB(10, 25, 255)
    else
        MainColor = Color3.fromRGB(0, 51, 179)
        Background = Color3.fromRGB(0, 51, 179)
        zyColor = Color3.fromRGB(0, 51, 179)
        beijingColor = Color3.fromRGB(0, 51, 179)
    end
    
    local dogent = Instance.new("ScreenGui")
    local Main = Instance.new("Frame")
    local TabMain = Instance.new("Frame")
    local SB = Instance.new("Frame")
    local SBC = Instance.new("UICorner")
    local Side = Instance.new("Frame")
    local SideG = Instance.new("UIGradient")
    local TabBtns = Instance.new("ScrollingFrame")
    local TabBtnsL = Instance.new("UIListLayout")
    local ScriptTitle = Instance.new("TextLabel")
    local SBG = Instance.new("UIGradient")
    local Open = Instance.new("TextButton")
    local DropShadowHolder = Instance.new("Frame")
    local DropShadow = Instance.new("ImageLabel")
    local UICornerMain = Instance.new("UICorner")
    local UIGradient = Instance.new("UIGradient")
    local UIGradientTitle = Instance.new("UIGradient")

    if syn and syn.protect_gui then syn.protect_gui(dogent) end

    dogent.Name = "qing"
    dogent.Parent = services.CoreGui

    Main.Name = "Main"
    Main.Parent = dogent
    Main.AnchorPoint = Vector2.new(0.5, 0.5)
    Main.BackgroundColor3 = Background
    Main.BorderColor3 = MainColor
    Main.Position = UDim2.new(0.5, 0, 0.5, 0)
    Main.Size = UDim2.new(0, 572, 0, 353)
    Main.ZIndex = 1
    Main.Active = true
    
    -- 修复拖动：确保Main可以被拖动
    drag(Main)

    UICornerMain.Parent = Main
    UICornerMain.CornerRadius = UDim.new(0,3)

    DropShadowHolder.Name = "DropShadowHolder"
    DropShadowHolder.Parent = Main
    DropShadowHolder.BackgroundTransparency = 1.000
    DropShadowHolder.BorderSizePixel = 0
    DropShadowHolder.Size = UDim2.new(1, 0, 1, 0)
    DropShadowHolder.ZIndex = 0

    DropShadow.Name = "DropShadow"
    DropShadow.Parent = DropShadowHolder
    DropShadow.AnchorPoint = Vector2.new(0.5, 0.5)
    DropShadow.BackgroundTransparency = 1.000
    DropShadow.BorderSizePixel = 0
    DropShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
    DropShadow.Size = UDim2.new(1, 43, 1, 43)
    DropShadow.ZIndex = 0
    DropShadow.Image = "rbxassetid://6015897843"
    DropShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
    DropShadow.ImageTransparency = 0.500
    DropShadow.ScaleType = Enum.ScaleType.Slice
    DropShadow.SliceCenter = Rect.new(49, 49, 450, 450)

    UIGradient.Color = ColorSequence.new{
        ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 0)), 
        ColorSequenceKeypoint.new(0.10, Color3.fromRGB(255, 127, 0)), 
        ColorSequenceKeypoint.new(0.20, Color3.fromRGB(255, 255, 0)), 
        ColorSequenceKeypoint.new(0.30, Color3.fromRGB(0, 255, 0)), 
        ColorSequenceKeypoint.new(0.40, Color3.fromRGB(0, 255, 255)), 
        ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 0, 255)), 
        ColorSequenceKeypoint.new(0.60, Color3.fromRGB(139, 0, 255)), 
        ColorSequenceKeypoint.new(0.70, Color3.fromRGB(255, 0, 0)), 
        ColorSequenceKeypoint.new(0.80, Color3.fromRGB(255, 127, 0)), 
        ColorSequenceKeypoint.new(0.90, Color3.fromRGB(255, 255, 0)), 
        ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 255, 0))
    }
    UIGradient.Parent = DropShadow

    local TweenService = game:GetService("TweenService")
    local tweeninfo = TweenInfo.new(7, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1)
    local tween = TweenService:Create(UIGradient, tweeninfo, {Rotation = 360})
    tween:Play()

    TabMain.Name = "TabMain"
    TabMain.Parent = Main
    TabMain.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    TabMain.BackgroundTransparency = 1.000
    TabMain.Position = UDim2.new(0.217000037, 0, 0, 3)
    TabMain.Size = UDim2.new(0, 448, 0, 353)

    SB.Name = "SB"
    SB.Parent = Main
    SB.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    SB.BorderColor3 = MainColor
    SB.Size = UDim2.new(0, 8, 0, 353)

    SBC.CornerRadius = UDim.new(0, 6)
    SBC.Name = "SBC"
    SBC.Parent = SB

    Side.Name = "Side"
    Side.Parent = SB
    Side.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    Side.BorderColor3 = Color3.fromRGB(255, 255, 255)
    Side.BorderSizePixel = 0
    Side.ClipsDescendants = true
    Side.Position = UDim2.new(1, 0, 0, 0)
    Side.Size = UDim2.new(0, 110, 0, 353)

    SideG.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, zyColor), ColorSequenceKeypoint.new(1.00, zyColor)}
    SideG.Rotation = 90
    SideG.Name = "SideG"
    SideG.Parent = Side

    TabBtns.Name = "TabBtns"
    TabBtns.Parent = Side
    TabBtns.Active = true
    TabBtns.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    TabBtns.BackgroundTransparency = 1.000
    TabBtns.BorderSizePixel = 0
    TabBtns.Position = UDim2.new(0, 0, 0.0973535776, 0)
    TabBtns.Size = UDim2.new(0, 110, 0, 318)
    TabBtns.CanvasSize = UDim2.new(0, 0, 1, 0)
    TabBtns.ScrollBarThickness = 0

    TabBtnsL.Name = "TabBtnsL"
    TabBtnsL.Parent = TabBtns
    TabBtnsL.SortOrder = Enum.SortOrder.LayoutOrder
    TabBtnsL.Padding = UDim.new(0, 12)

    ScriptTitle.Name = "ScriptTitle"
    ScriptTitle.Parent = Side
    ScriptTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    ScriptTitle.BackgroundTransparency = 1.000
    ScriptTitle.Position = UDim2.new(0, 0, 0.00953488424, 0)
    ScriptTitle.Size = UDim2.new(0, 102, 0, 20)
    ScriptTitle.Font = Enum.Font.GothamSemibold
    ScriptTitle.Text = name
    ScriptTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
    ScriptTitle.TextSize = 14.000
    ScriptTitle.TextScaled = true
    ScriptTitle.TextXAlignment = Enum.TextXAlignment.Left

    UIGradientTitle.Parent = ScriptTitle

    SBG.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, zyColor), ColorSequenceKeypoint.new(1.00, zyColor)}
    SBG.Rotation = 90
    SBG.Name = "SBG"
    SBG.Parent = SB

    TabBtnsL:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
        TabBtns.CanvasSize = UDim2.new(0, 0, 0, TabBtnsL.AbsoluteContentSize.Y + 18)
    end)
    
    Open.Name = "Open"
    Open.Parent = dogent
    Open.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
    Open.Position = UDim2.new(0.00829315186, 0, 0.31107837, 0)
    Open.Size = UDim2.new(0, 61, 0, 32)
    Open.Font = Enum.Font.SourceSans
    Open.Text = "关/开"
    Open.TextColor3 = Color3.fromRGB(255, 255, 255)
    Open.TextSize = 14.000
    Open.Active = true
    Open.Draggable = false
    Open.MouseButton1Click:Connect(function()
        Main.Visible = not Main.Visible
    end)
    
    -- 修复：Ctrl键切换显示
    services.UserInputService.InputBegan:Connect(function(input, gameProcessed)
        if gameProcessed then return end
        if input.KeyCode == Enum.KeyCode.LeftControl then
            Main.Visible = not Main.Visible
        end
    end)

    local window = {}
    
    function window.Tab(window, name, icon)
        local Tab = Instance.new("ScrollingFrame")
        local TabIco = Instance.new("ImageLabel")
        local TabText = Instance.new("TextLabel")
        local TabBtn = Instance.new("TextButton")
        local TabL = Instance.new("UIListLayout")

        Tab.Name = "Tab"
        Tab.Parent = TabMain
        Tab.Active = true
        Tab.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
        Tab.BackgroundTransparency = 1.000
        Tab.Size = UDim2.new(1, 0, 1, 0)
        Tab.ScrollBarThickness = 2
        Tab.Visible = false

        TabIco.Name = "TabIco"
        TabIco.Parent = TabBtns
        TabIco.BackgroundTransparency = 1.000
        TabIco.BorderSizePixel = 0
        TabIco.Size = UDim2.new(0, 24, 0, 24)
        TabIco.Image = ("rbxassetid://%s"):format((icon or 4370341699))
        TabIco.ImageTransparency = 0.2

        TabText.Name = "TabText"
        TabText.Parent = TabIco
        TabText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
        TabText.BackgroundTransparency = 1.000
        TabText.Position = UDim2.new(1.41666663, 0, 0, 0)
        TabText.Size = UDim2.new(0, 76, 0, 24)
        TabText.Font = Enum.Font.GothamSemibold
        TabText.Text = name
        TabText.TextColor3 = Color3.fromRGB(255, 255, 255)
        TabText.TextSize = 14.000
        TabText.TextXAlignment = Enum.TextXAlignment.Left
        TabText.TextTransparency = 0.2

        TabBtn.Name = "TabBtn"
        TabBtn.Parent = TabIco
        TabBtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
        TabBtn.BackgroundTransparency = 1.000
        TabBtn.BorderSizePixel = 0
        TabBtn.Size = UDim2.new(0, 110, 0, 24)
        TabBtn.AutoButtonColor = false
        TabBtn.Font = Enum.Font.SourceSans
        TabBtn.Text = ""
        TabBtn.TextColor3 = Color3.fromRGB(0, 0, 0)
        TabBtn.TextSize = 14.000

        TabL.Name = "TabL"
        TabL.Parent = Tab
        TabL.SortOrder = Enum.SortOrder.LayoutOrder
        TabL.Padding = UDim.new(0, 4)

        TabBtn.MouseButton1Click:Connect(function()
            spawn(function()
                Ripple(TabBtn)
            end)
            switchTab({TabIco, Tab})
        end)

        if library.currentTab == nil then switchTab({TabIco, Tab}) end

        TabL:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
            Tab.CanvasSize = UDim2.new(0, 0, 0, TabL.AbsoluteContentSize.Y + 8)
        end)

        local tab = {}
        
        function tab.section(tab, name, TabVal)
            local Section = Instance.new("Frame")
            local SectionC = Instance.new("UICorner")
            local SectionText = Instance.new("TextLabel")
            local SectionOpen = Instance.new("ImageLabel")
            local SectionOpened = Instance.new("ImageLabel")
            local SectionToggle = Instance.new("ImageButton")
            local Objs = Instance.new("Frame")
            local ObjsL = Instance.new("UIListLayout")

            Section.Name = "Section"
            Section.Parent = Tab
            Section.BackgroundColor3 = Color3.fromRGB(102, 190, 193)
            Section.BackgroundTransparency = 1.000
            Section.BorderSizePixel = 0
            Section.ClipsDescendants = true
            Section.Size = UDim2.new(0.981000006, 0, 0, 36)

            SectionC.CornerRadius = UDim.new(0, 6)
            SectionC.Name = "SectionC"
            SectionC.Parent = Section

            SectionText.Name = "SectionText"
            SectionText.Parent = Section
            SectionText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
            SectionText.BackgroundTransparency = 1.000
            SectionText.Position = UDim2.new(0.0887396261, 0, 0, 0)
            SectionText.Size = UDim2.new(0, 401, 0, 36)
            SectionText.Font = Enum.Font.GothamSemibold
            SectionText.Text = name
            SectionText.TextColor3 = Color3.fromRGB(255, 255, 255)
            SectionText.TextSize = 16.000
            SectionText.TextXAlignment = Enum.TextXAlignment.Left

            SectionOpen.Name = "SectionOpen"
            SectionOpen.Parent = SectionText
            SectionOpen.BackgroundTransparency = 1
            SectionOpen.BorderSizePixel = 0
            SectionOpen.Position = UDim2.new(0, -33, 0, 5)
            SectionOpen.Size = UDim2.new(0, 26, 0, 26)
            SectionOpen.Image = "http://www.roblox.com/asset/?id=6031302934"

            SectionOpened.Name = "SectionOpened"
            SectionOpened.Parent = SectionOpen
            SectionOpened.BackgroundTransparency = 1.000
            SectionOpened.BorderSizePixel = 0
            SectionOpened.Size = UDim2.new(0, 26, 0, 26)
            SectionOpened.Image = "http://www.roblox.com/asset/?id=6031302932"
            SectionOpened.ImageTransparency = 1.000

            SectionToggle.Name = "SectionToggle"
            SectionToggle.Parent = SectionOpen
            SectionToggle.BackgroundTransparency = 1
            SectionToggle.BorderSizePixel = 0
            SectionToggle.Size = UDim2.new(0, 26, 0, 26)

            Objs.Name = "Objs"
            Objs.Parent = Section
            Objs.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
            Objs.BackgroundTransparency = 1
            Objs.BorderSizePixel = 0
            Objs.Position = UDim2.new(0, 6, 0, 36)
            Objs.Size = UDim2.new(0.986347735, 0, 0, 0)

            ObjsL.Name = "ObjsL"
            ObjsL.Parent = Objs
            ObjsL.SortOrder = Enum.SortOrder.LayoutOrder
            ObjsL.Padding = UDim.new(0, 8)

            local open = TabVal
            if TabVal ~= false then
                Section.Size = UDim2.new(0.981000006, 0, 0, open and 36 + ObjsL.AbsoluteContentSize.Y + 8 or 36)
                SectionOpened.ImageTransparency = (open and 0 or 1)
                SectionOpen.ImageTransparency = (open and 1 or 0)
            end

            SectionToggle.MouseButton1Click:Connect(function()
                open = not open
                Section.Size = UDim2.new(0.981000006, 0, 0, open and 36 + ObjsL.AbsoluteContentSize.Y + 8 or 36)
                SectionOpened.ImageTransparency = (open and 0 or 1)
                SectionOpen.ImageTransparency = (open and 1 or 0)
            end)

            ObjsL:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
                if not open then return end
                Section.Size = UDim2.new(0.981000006, 0, 0, 36 + ObjsL.AbsoluteContentSize.Y + 8)
            end)

            local section = {}
            
            function section.Button(section, text, callback)
                local callback = callback or function() end

                local BtnModule = Instance.new("Frame")
                local Btn = Instance.new("TextButton")
                local BtnC = Instance.new("UICorner")

                BtnModule.Name = "BtnModule"
                BtnModule.Parent = Objs
                BtnModule.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
                BtnModule.BackgroundTransparency = 1.000
                BtnModule.BorderSizePixel = 0
                BtnModule.Position = UDim2.new(0, 0, 0, 0)
                BtnModule.Size = UDim2.new(0, 428, 0, 38)

                Btn.Name = "Btn"
                Btn.Parent = BtnModule
                Btn.BackgroundColor3 = zyColor
                Btn.BorderSizePixel = 0
                Btn.Size = UDim2.new(0, 428, 0, 38)
                Btn.AutoButtonColor = false
                Btn.Font = Enum.Font.GothamSemibold
                Btn.Text = "   " .. text
                Btn.TextColor3 = Color3.fromRGB(255, 255, 255)
                Btn.TextSize = 16.000
                Btn.TextXAlignment = Enum.TextXAlignment.Left

                BtnC.CornerRadius = UDim.new(0, 6)
                BtnC.Name = "BtnC"
                BtnC.Parent = Btn

                Btn.MouseButton1Click:Connect(function()
                    spawn(function()
                        Ripple(Btn)
                    end)
                    spawn(callback)
                end)
            end

            function section:Label(text)
                local LabelModule = Instance.new("Frame")
                local TextLabel = Instance.new("TextLabel")
                local LabelC = Instance.new("UICorner")

                LabelModule.Name = "LabelModule"
                LabelModule.Parent = Objs
                LabelModule.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
                LabelModule.BackgroundTransparency = 1.000
                LabelModule.BorderSizePixel = 0
                LabelModule.Position = UDim2.new(0, 0, 0, 0)
                LabelModule.Size = UDim2.new(0, 428, 0, 19)

                TextLabel.Parent = LabelModule
                TextLabel.BackgroundColor3 = zyColor
                TextLabel.Size = UDim2.new(0, 428, 0, 22)
                TextLabel.Font = Enum.Font.GothamSemibold
                TextLabel.Text = text
                TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
                TextLabel.TextSize = 14.000

                LabelC.CornerRadius = UDim.new(0, 6)
                LabelC.Name = "LabelC"
                LabelC.Parent = TextLabel
                return TextLabel
            end

            function section.Toggle(section, text, flag, enabled, callback)
                local callback = callback or function() end
                local enabled = enabled or false
                assert(text, "No text provided")
                assert(flag, "No flag provided")

                library.flags[flag] = enabled

                local ToggleModule = Instance.new("Frame")
                local ToggleBtn = Instance.new("TextButton")
                local ToggleBtnC = Instance.new("UICorner")
                local ToggleDisable = Instance.new("Frame")
                local ToggleSwitch = Instance.new("Frame")
                local ToggleSwitchC = Instance.new("UICorner")
                local ToggleDisableC = Instance.new("UICorner")

                ToggleModule.Name = "ToggleModule"
                ToggleModule.Parent = Objs
                ToggleModule.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
                ToggleModule.BackgroundTransparency = 1.000
                ToggleModule.BorderSizePixel = 0
                ToggleModule.Position = UDim2.new(0, 0, 0, 0)
                ToggleModule.Size = UDim2.new(0, 428, 0, 38)

                ToggleBtn.Name = "ToggleBtn"
                ToggleBtn.Parent = ToggleModule
                ToggleBtn.BackgroundColor3 = zyColor
                ToggleBtn.BorderSizePixel = 0
                ToggleBtn.Size = UDim2.new(0, 428, 0, 38)
                ToggleBtn.AutoButtonColor = false
                ToggleBtn.Font = Enum.Font.GothamSemibold
                ToggleBtn.Text = "   " .. text
                ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
                ToggleBtn.TextSize = 16.000
                ToggleBtn.TextXAlignment = Enum.TextXAlignment.Left

                ToggleBtnC.CornerRadius = UDim.new(0, 6)
                ToggleBtnC.Name = "ToggleBtnC"
                ToggleBtnC.Parent = ToggleBtn

                ToggleDisable.Name = "ToggleDisable"
                ToggleDisable.Parent = ToggleBtn
                ToggleDisable.BackgroundColor3 = Background
                ToggleDisable.BorderSizePixel = 0
                ToggleDisable.Position = UDim2.new(0.901869178, 0, 0.208881587, 0)
                ToggleDisable.Size = UDim2.new(0, 36, 0, 22)

                ToggleSwitch.Name = "ToggleSwitch"
                ToggleSwitch.Parent = ToggleDisable
                ToggleSwitch.BackgroundColor3 = beijingColor
                ToggleSwitch.Size = UDim2.new(0, 24, 0, 22)

                ToggleSwitchC.CornerRadius = UDim.new(0, 6)
                ToggleSwitchC.Name = "ToggleSwitchC"
                ToggleSwitchC.Parent = ToggleSwitch

                ToggleDisableC.CornerRadius = UDim.new(0, 6)
                ToggleDisableC.Name = "ToggleDisableC"
                ToggleDisableC.Parent = ToggleDisable

                local funcs = {
                    SetState = function(self, state)
                        if state == nil then state = not library.flags[flag] end
                        if library.flags[flag] == state then return end
                        services.TweenService:Create(ToggleSwitch, TweenInfo.new(0.2), {Position = UDim2.new(0, (state and ToggleSwitch.Size.X.Offset / 2 or 0), 0, 0), BackgroundColor3 = (state and Color3.fromRGB(255, 255, 255) or beijingColor)}):Play()
                        library.flags[flag] = state
                        callback(state)
                    end,
                    Module = ToggleModule
                }

                if enabled ~= false then
                    funcs:SetState(flag,true)
                end

                ToggleBtn.MouseButton1Click:Connect(function()
                    funcs:SetState()
                end)
                return funcs
            end

            function section.Textbox(section, text, flag, default, callback)
                local callback = callback or function() end
                assert(text, "No text provided")
                assert(flag, "No flag provided")
                assert(default, "No default text provided")

                library.flags[flag] = default

                local TextboxModule = Instance.new("Frame")
                local TextboxBack = Instance.new("TextButton")
                local TextboxBackC = Instance.new("UICorner")
                local BoxBG = Instance.new("TextButton")
                local BoxBGC = Instance.new("UICorner")
                local TextBox = Instance.new("TextBox")
                local TextboxBackL = Instance.new("UIListLayout")
                local TextboxBackP = Instance.new("UIPadding")

                TextboxModule.Name = "TextboxModule"
                TextboxModule.Parent = Objs
                TextboxModule.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
                TextboxModule.BackgroundTransparency = 1.000
                TextboxModule.BorderSizePixel = 0
                TextboxModule.Position = UDim2.new(0, 0, 0, 0)
                TextboxModule.Size = UDim2.new(0, 428, 0, 38)

                TextboxBack.Name = "TextboxBack"
                TextboxBack.Parent = TextboxModule
                TextboxBack.BackgroundColor3 = zyColor
                TextboxBack.BorderSizePixel = 0
                TextboxBack.Size = UDim2.new(0, 428, 0, 38)
                TextboxBack.AutoButtonColor = false
                TextboxBack.Font = Enum.Font.GothamSemibold
                TextboxBack.Text = "   " .. text
                TextboxBack.TextColor3 = Color3.fromRGB(255, 255, 255)
                TextboxBack.TextSize = 16.000
                TextboxBack.TextXAlignment = Enum.TextXAlignment.Left

                TextboxBackC.CornerRadius = UDim.new(0, 6)
                TextboxBackC.Name = "TextboxBackC"
                TextboxBackC.Parent = TextboxBack

                BoxBG.Name = "BoxBG"
                BoxBG.Parent = TextboxBack
                BoxBG.BackgroundColor3 = Background
                BoxBG.BorderSizePixel = 0
                BoxBG.Position = UDim2.new(0.763033211, 0, 0.289473683, 0)
                BoxBG.Size = UDim2.new(0, 100, 0, 28)
                BoxBG.AutoButtonColor = false
                BoxBG.Font = Enum.Font.Gotham
                BoxBG.Text = ""
                BoxBG.TextColor3 = Color3.fromRGB(255, 255, 255)
                BoxBG.TextSize = 14.000

                BoxBGC.CornerRadius = UDim.new(0, 6)
                BoxBGC.Name = "BoxBGC"
                BoxBGC.Parent = BoxBG

                TextBox.Parent = BoxBG
                TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
                TextBox.BackgroundTransparency = 1.000
                TextBox.BorderSizePixel = 0
                TextBox.Size = UDim2.new(1, 0, 1, 0)
                TextBox.Font = Enum.Font.Gotham
                TextBox.Text = default
                TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
                TextBox.TextSize = 14.000

                TextboxBackL.Name = "TextboxBackL"
                TextboxBackL.Parent = TextboxBack
                TextboxBackL.HorizontalAlignment = Enum.HorizontalAlignment.Right
                TextboxBackL.SortOrder = Enum.SortOrder.LayoutOrder
                TextboxBackL.VerticalAlignment = Enum.VerticalAlignment.Center

                TextboxBackP.Name = "TextboxBackP"
                TextboxBackP.Parent = TextboxBack
                TextboxBackP.PaddingRight = UDim.new(0, 6)

                TextBox.FocusLost:Connect(function()
                    if TextBox.Text == "" then
                        TextBox.Text = default
                    end
                    library.flags[flag] = TextBox.Text
                    callback(TextBox.Text)
                end)

                TextBox:GetPropertyChangedSignal("TextBounds"):Connect(function()
                    BoxBG.Size = UDim2.new(0, TextBox.TextBounds.X + 30, 0, 28)
                end)
                BoxBG.Size = UDim2.new(0, TextBox.TextBounds.X + 30, 0, 28)
            end

            function section.Dropdown(section, text, flag, options, callback)
                local callback = callback or function() end
                local options = options or {}
                assert(text, "No text provided")
                assert(flag, "No flag provided")

                library.flags[flag] = nil

                local DropdownModule = Instance.new("Frame")
                local DropdownTop = Instance.new("TextButton")
                local DropdownTopC = Instance.new("UICorner")
                local DropdownOpen = Instance.new("TextButton")
                local DropdownText = Instance.new("TextBox")
                local DropdownModuleL = Instance.new("UIListLayout")

                DropdownModule.Name = "DropdownModule"
                DropdownModule.Parent = Objs
                DropdownModule.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
                DropdownModule.BackgroundTransparency = 1.000
                DropdownModule.BorderSizePixel = 0
                DropdownModule.ClipsDescendants = true
                DropdownModule.Position = UDim2.new(0, 0, 0, 0)
                DropdownModule.Size = UDim2.new(0, 428, 0, 38)

                DropdownTop.Name = "DropdownTop"
                DropdownTop.Parent = DropdownModule
                DropdownTop.BackgroundColor3 = zyColor
                DropdownTop.BorderSizePixel = 0
                DropdownTop.Size = UDim2.new(0, 428, 0, 38)
                DropdownTop.AutoButtonColor = false
                DropdownTop.Font = Enum.Font.GothamSemibold
                DropdownTop.Text = ""
                DropdownTop.TextColor3 = Color3.fromRGB(255, 255, 255)
                DropdownTop.TextSize = 16.000
                DropdownTop.TextXAlignment = Enum.TextXAlignment.Left

                DropdownTopC.CornerRadius = UDim.new(0, 6)
                DropdownTopC.Name = "DropdownTopC"
                DropdownTopC.Parent = DropdownTop

                DropdownOpen.Name = "DropdownOpen"
                DropdownOpen.Parent = DropdownTop
                DropdownOpen.AnchorPoint = Vector2.new(0, 0.5)
                DropdownOpen.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
                DropdownOpen.BackgroundTransparency = 1.000
                DropdownOpen.BorderSizePixel = 0
                DropdownOpen.Position = UDim2.new(0.918383181, 0, 0.5, 0)
                DropdownOpen.Size = UDim2.new(0, 20, 0, 20)
                DropdownOpen.Font = Enum.Font.Gotham
                DropdownOpen.Text = "+"
                DropdownOpen.TextColor3 = Color3.fromRGB(255, 255, 255)
                DropdownOpen.TextSize = 24.000
                DropdownOpen.TextWrapped = true

                DropdownText.Name = "DropdownText"
                DropdownText.Parent = DropdownTop
                DropdownText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
                DropdownText.BackgroundTransparency = 1.000
                DropdownText.BorderSizePixel = 0
                DropdownText.Position = UDim2.new(0.0373831764, 0, 0, 0)
                DropdownText.Size = UDim2.new(0, 184, 0, 38)
                DropdownText.Font = Enum.Font.GothamSemibold
                DropdownText.PlaceholderColor3 = Color3.fromRGB(255, 255, 255)
                DropdownText.PlaceholderText = text
                DropdownText.Text = ""
                DropdownText.TextColor3 = Color3.fromRGB(255, 255, 255)
                DropdownText.TextSize = 16.000
                DropdownText.TextXAlignment = Enum.TextXAlignment.Left

                DropdownModuleL.Name = "DropdownModuleL"
                DropdownModuleL.Parent = DropdownModule
                DropdownModuleL.SortOrder = Enum.SortOrder.LayoutOrder
                DropdownModuleL.Padding = UDim.new(0, 4)

                local funcs = {}
                funcs.AddOption = function(self, option)
                    local Option = Instance.new("TextButton")
                    local OptionC = Instance.new("UICorner")

                    Option.Name = "Option_" .. option
                    Option.Parent = DropdownModule
                    Option.BackgroundColor3 = zyColor
                    Option.BorderSizePixel = 0
                    Option.Position = UDim2.new(0, 0, 0.328125, 0)
                    Option.Size = UDim2.new(0, 428, 0, 26)
                    Option.AutoButtonColor = false
                    Option.Font = Enum.Font.Gotham
                    Option.Text = option
                    Option.TextColor3 = Color3.fromRGB(255, 255, 255)
                    Option.TextSize = 14.000

                    OptionC.CornerRadius = UDim.new(0, 6)
                    OptionC.Name = "OptionC"
                    OptionC.Parent = Option

                    Option.MouseButton1Click:Connect(function()
                        callback(Option.Text)
                        DropdownText.Text = Option.Text
                        library.flags[flag] = Option.Text
                    end)
                end

                funcs.SetOptions = function(self, options)
                    for _, v in next, DropdownModule:GetChildren() do
                        if v.Name:match("Option_") then
                            v:Destroy()
                        end
                    end
                    for _,v in next, options do
                        funcs:AddOption(v)
                    end
                end

                funcs:SetOptions(options)
                return funcs
            end

            return section
        end
        return tab
    end
    return window
end

-- ==================== 创建界面和所有功能 ====================
local win = library:new("思绪脚本中心付费版")

-- 创建7个标签页对应新脚本的功能
local Tab1 = win:Tab("封禁信息", "10882439086")
local Tab2 = win:Tab("玩家功能", "10728953248")
local Tab3 = win:Tab("战斗功能", "4626047596")
local Tab4 = win:Tab("魔法功能", "4483345998")
local Tab5 = win:Tab("购买功能", "6015897843")
local Tab6 = win:Tab("自动功能", "4370341699")
local Tab7 = win:Tab("收集功能", "16785029075")

-- ==================== 标签1: 封禁信息 ====================
local SectionBan = Tab1:section("封禁信息")
local banReasonLabel = SectionBan:Label("封禁原因：无")
local banCountLabel = SectionBan:Label("封禁次数：无")
local isBannedLabel = SectionBan:Label("是否封禁：否")
local banTimeLabel = SectionBan:Label("封禁时间：无")
local unbanTimeLabel = SectionBan:Label("解封时间：无")

SectionBan:Button("刷新封禁信息", function()
    local isBanned, banReason, banCount, banAt, unbanAt, remainingTime = getBanInfo()
    banReasonLabel.Text = "封禁原因：" .. (banReason or "无")
    banCountLabel.Text = "封禁次数：" .. (banCount or "无")
    isBannedLabel.Text = "是否封禁：" .. (isBanned and "是" or "否")
    banTimeLabel.Text = "封禁时间：" .. (banAt or "无")
    unbanTimeLabel.Text = "解封时间：" .. (unbanAt or "无")
end)

-- ==================== 标签2: 玩家功能 ====================
local SectionPlayer = Tab2:section("玩家设置")

SectionPlayer:Button("透视ESP", function()
    local Players = game:GetService("Players")
    local RunService = game:GetService("RunService")
    local LocalPlayer = Players.LocalPlayer
    local LocalCharacter = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
    local LocalHead = LocalCharacter:WaitForChild("Head")
    local playerConnections = {}
    
    local function updateNametag(player, textLabel, head)
        local character = player.Character
        if not character then return end
        local humanoid = character:FindFirstChildOfClass("Humanoid")
        local targetHead = character:FindFirstChild("Head")
        if humanoid and targetHead and humanoid.Health > 0 then
            local distance = (LocalHead.Position - targetHead.Position).Magnitude
            textLabel.Text = string.format("%s\n血量: %d/%d\n距离: %.1fm", player.Name, math.floor(humanoid.Health), math.floor(humanoid.MaxHealth), distance)
            textLabel.Visible = true
        else
            textLabel.Visible = false
        end
    end
    
    local function createNametag(player)
        if player == LocalPlayer then return end
        playerConnections[player] = {}
        
        local function setupCharacter(character)
            local head = character:WaitForChild("Head")
            local billboard = Instance.new("BillboardGui")
            billboard.Name = "PlayerNametag"
            billboard.Adornee = head
            billboard.Size = UDim2.new(0, 200, 0, 80)
            billboard.StudsOffset = Vector3.new(0, 3, 0)
            billboard.AlwaysOnTop = true
            billboard.Parent = head
            
            local textLabel = Instance.new("TextLabel")
            textLabel.Size = UDim2.new(1, 0, 1, 0)
            textLabel.Font = Enum.Font.GothamBold
            textLabel.TextSize = 8
            textLabel.TextColor3 = Color3.new(1, 0, 0)
            textLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
            textLabel.TextStrokeTransparency = 0.3
            textLabel.BackgroundTransparency = 1
            textLabel.TextYAlignment = Enum.TextYAlignment.Top
            textLabel.Parent = billboard
            
            local heartbeatConn = RunService.Heartbeat:Connect(function()
                if not character or not character.Parent then
                    heartbeatConn:Disconnect()
                    return
                end
                updateNametag(player, textLabel, head)
            end)
            table.insert(playerConnections[player], heartbeatConn)
        end
        
        if player.Character then
            setupCharacter(player.Character)
        end
        
        local charAddedConn = player.CharacterAdded:Connect(setupCharacter)
        table.insert(playerConnections[player], charAddedConn)
    end
    
    Players.PlayerAdded:Connect(createNametag)
    
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= LocalPlayer then
            createNametag(player)
        end
    end
end)

SectionPlayer:Textbox("加速设置", "speedBox", "1-15", function(value)
    speed = tonumber(value) or 1
end)

SectionPlayer:Toggle("速度开关", "speedToggle", false, function(state)
    tpEnabled = state
    if state then
        startTPWalk()
    else
        stopTPWalk()
    end
end)

local jumpConnection
SectionPlayer:Toggle("连跳", "jumpToggle", false, function(state)
    if state then
        jumpConnection = game:GetService("UserInputService").JumpRequest:Connect(function()
            if humanoid and humanoid.Health > 0 then
                humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
            end
        end)
    else
        if jumpConnection then
            jumpConnection:Disconnect()
            jumpConnection = nil
        end
    end
end)

-- ==================== 标签3: 战斗功能 ====================
local SectionCombat = Tab3:section("战斗设置")

SectionCombat:Textbox("物品栏数量", "inventorySlots", "1-9", function(value)
    pcall(function()
        local sum = require(game.ReplicatedStorage.devv.client.Objects.v3item.modules.inventory)
        sum.numSlots = tonumber(value) or 9
    end)
end)

SectionCombat:Toggle("杀戮光环", "killAuraToggle", false, function(state)
    autokill = state
end)

SectionCombat:Toggle("踩踏光环", "stompAuraToggle", false, function(state)
    autostomp = state
end)

SectionCombat:Toggle("抓取光环", "grabAuraToggle", false, function(state)
    grabplay = state
end)

SectionCombat:Toggle("反布娃娃状态", "antiRagdollToggle", false, function(state)
    antirea = state
    if antirea then
        spawn(function()
            while antirea and task.wait() do
                pcall(function()
                    Signal.FireServer("setRagdoll", false)
                end)
            end
        end)
    end
end)

SectionCombat:Toggle("反坐下状态", "antiSitToggle", false, function(state)
    antisit = state
    if antisit then
        spawn(function()
            while antisit and task.wait() do
                pcall(function()
                    local Players = game:GetService("Players")
                    local player = Players.LocalPlayer
                    if player.Character then
                        local humanoid = player.Character:FindFirstChild("Humanoid")
                        if humanoid then
                            humanoid.Sit = false
                        end
                    end
                end)
            end
        end)
    end
end)

SectionCombat:Toggle("自动穿甲", "autoArmorToggle", false, function(state)
    autojia = state
end)

SectionCombat:Toggle("自动回血", "autoHealToggle", false, function(state)
    autolok = state
end)

-- ==================== 标签4: 魔法功能 ====================
local SectionMagic = Tab4:section("魔法设置")

SectionMagic:Label("朝地面轰一炮即可触发 失效重新开启")

SectionMagic:Button("购买RPG武器", function()
    pcall(function()
        Signal.InvokeServer("attemptPurchase", "RPG")
    end)
end)

SectionMagic:Button("购买RPG子弹", function()
    pcall(function()
        Signal.InvokeServer("attemptPurchaseAmmo", "RPG")
    end)
end)

SectionMagic:Toggle("RPG全图轰炸", "rpgBombToggle", false, function(state)
    if state then
        spawn(function()
            pcall(function()
                local ReplicatedStorage = game:GetService("ReplicatedStorage")
                local Players = game:GetService("Players")
                local localPlayer = Players.LocalPlayer
                
                local function findRemoteEvent(eventName)
                    for _, v in next, getgc(false) do
                        if typeof(v) == "function" then
                            local source = debug.info(v, "s")
                            local name = debug.info(v, "n")
                            if source and source:find("Signal") and name == "FireServer" then
                                local success, upvalue = pcall(getupvalue, v, 1)
                                if success and upvalue and typeof(upvalue) == "table" then
                                    for k, remote in pairs(upvalue) do
                                        if k == eventName then
                                            return typeof(remote) == "string" and ReplicatedStorage.devv.remoteStorage[remote] or remote
                                        end
                                    end
                                end
                                break
                            end
                        end
                    end
                    return nil
                end
                
                local rocketHit = ReplicatedStorage.devv.remoteStorage:FindFirstChild("rocketHit") or findRemoteEvent("rocketHit")
                local lastArgs = nil
                local isListening = false
                
                local originalNamecall
                originalNamecall = hookmetamethod(game, "__namecall", function(self, ...)
                    local args = {...}
                    local method = getnamecallmethod()
                    if self == rocketHit and method == "FireServer" then
                        if not lastArgs then
                            lastArgs = args
                            isListening = true
                            coroutine.wrap(function()
                                while isListening and lastArgs do
                                    local otherPlayersPositions = {}
                                    for _, player in ipairs(Players:GetPlayers()) do
                                        if player ~= localPlayer and player.Character then
                                            local rootPart = player.Character:FindFirstChild("HumanoidRootPart")
                                            if rootPart then
                                                table.insert(otherPlayersPositions, rootPart.Position)
                                            end
                                        end
                                    end
                                    if #otherPlayersPositions > 0 then
                                        local randomIndex = math.random(1, #otherPlayersPositions)
                                        local modifiedArgs = {lastArgs[1], lastArgs[2], otherPlayersPositions[randomIndex]}
                                        rocketHit:FireServer(unpack(modifiedArgs))
                                    end
                                    task.wait()
                                end
                            end)()
                        end
                    end
                    return originalNamecall(self, ...)
                end)
            end)
        end)
    end
end)

SectionMagic:Toggle("子弹追踪", "bulletTrackToggle", false, function(state)
    killoppEnabled = state
end)

SectionMagic:Toggle("忽略好友", "ignoreFriendsToggle", false, function(state)
    ignoreFriendsEnabled = state
end)

-- ==================== 标签5: 购买功能 ====================
local SectionPurchase = Tab5:section("购买设置")

local itemsOnSale = workspace:FindFirstChild("ItemsOnSale")
local itemNames = {"武器", "弹药", "护甲", "医疗包"}
if itemsOnSale then
    local seenNames = {}
    for _, item in ipairs(itemsOnSale:GetChildren()) do
        if not seenNames[item.Name] then
            table.insert(itemNames, item.Name)
            seenNames[item.Name] = true
        end
    end
end

SectionPurchase:Button("购买物品", function()
    if selectedItem then
        pcall(function()
            Signal.InvokeServer("attemptPurchase", selectedItem)
        end)
    end
end)

SectionPurchase:Button("购买子弹", function()
    if selectedItem then
        pcall(function()
            Signal.InvokeServer("attemptPurchaseAmmo", selectedItem)
        end)
    end
end)

-- ==================== 标签6: 自动功能 ====================
local SectionAuto = Tab6:section("自动设置")

SectionAuto:Toggle("自动消耗品", "autoUseToggle", false, function(state)
    autouse = state
end)

SectionAuto:Toggle("自动售卖物品", "autoSellToggle", false, function(state)
    autosell = state
end)

SectionAuto:Toggle("自动清理垃圾", "autoCleanToggle", false, function(state)
    autorem = state
end)

SectionAuto:Toggle("自动装备拳头", "autoEquipFistsToggle", false, function(state)
    autozb = state
end)

SectionAuto:Toggle("自动攻击ATM", "autoATMToggle", false, function(state)
    autoatm = state
end)

SectionAuto:Toggle("自动抢劫银行", "autoBankToggle", false, function(state)
    autobank = state
end)

SectionAuto:Toggle("自动开保险箱", "autoSafeToggle", false, function(state)
    bxbx = state
end)

SectionAuto:Toggle("自动购买撬锁", "autoLockpickToggle", false, function(state)
    lock = state
end)

-- ==================== 标签7: 收集功能 ====================
local SectionCollect = Tab7:section("收集设置")

SectionCollect:Toggle("自动拾取材料", "autoCollectMaterialsToggle", false, function(state)
    autocl = state
end)

SectionCollect:Toggle("自动拾取宝石", "autoCollectGemsToggle", false, function(state)
    autobs = state
end)

SectionCollect:Toggle("自动拾取红卡", "autoCollectRedCardToggle", false, function(state)
    autohk = state
end)

SectionCollect:Toggle("自动拾取印钞机", "autoCollectMoneyPrintToggle", false, function(state)
    automn = state
end)

SectionCollect:Toggle("自动拾取顶级物品", "autoCollectTopItemsToggle", false, function(state)
    autodj = state
end)

SectionCollect:Toggle("自动拾取金条", "autoCollectGoldToggle", false, function(state)
    autojt = state
end)

SectionCollect:Toggle("自动拾取气球", "autoCollectBalloonsToggle", false, function(state)
    autoqq = state
end)

SectionCollect:Toggle("自动拾取蓝色糖果棒", "autoCollectBlueCandyToggle", false, function(state)
    autoblue = state
end)

SectionCollect:Toggle("自动拾取幸运方块", "autoCollectLuckyBlockToggle", false, function(state)
    autoluck = state
end)

-- ==================== 主循环 ====================
RunService.Heartbeat:Connect(function()
    pcall(function()
        -- 自动杀戮光环
        if autokill then
            local Players = game:GetService("Players")
            local localPlayer = Players.LocalPlayer
            local character = localPlayer.Character
            if character then
                local rootPart = character:FindFirstChild("HumanoidRootPart")
                if rootPart then
                    for _, player in ipairs(Players:GetPlayers()) do
                        if player ~= localPlayer and player.Character then
                            local targetChar = player.Character
                            local targetHRP = targetChar:FindFirstChild("HumanoidRootPart")
                            local targetHumanoid = targetChar:FindFirstChild("Humanoid")
                            if targetHRP and targetHumanoid and targetHumanoid.Health > 0 then
                                local distance = (rootPart.Position - targetHRP.Position).Magnitude
                                if distance <= 40 then
                                    local uid = player.UserId
                                    pcall(function()
                                        require(game:GetService("ReplicatedStorage").devv).load("Signal").FireServer("equip", qtid)
                                        require(game:GetService("ReplicatedStorage").devv).load("Signal").FireServer("meleeItemHit", "player", {hitPlayerId = uid, meleeType = hitMOD})
                                    end)
                                    break
                                end
                            end
                        end
                    end
                end
            end
        end

        -- 自动穿甲
        if autojia and item then
            pcall(function()
                Signal.InvokeServer("attemptPurchase", jiahit)
                for i, v in next, item.inventory.items do
                    if v.name == jiahit then
                        local light = v.guid
                        local armor = game:GetService('Players').LocalPlayer:GetAttribute('armor')
                        if armor == nil or armor <= 0 then
                            Signal.FireServer("equip", light)
                            Signal.FireServer("useConsumable", light)
                            Signal.FireServer("removeItem", light)
                            break
                        end
                    end
                end
            end)
        end

        -- 自动回血
        if autolok and item then
            pcall(function()
                Signal.InvokeServer("attemptPurchase", 'Bandage')
                for i, v in next, item.inventory.items do
                    if v.name == 'Bandage' then
                        local bande = v.guid
                        local Players = game:GetService('Players')
                        local LocalPlayer = Players.LocalPlayer
                        local Character = LocalPlayer.Character
                        if Character then
                            local Humanoid = Character:FindFirstChild('Humanoid')
                            if Humanoid and Humanoid.Health < Humanoid.MaxHealth then
                                Signal.FireServer("equip", bande)
                                Signal.FireServer("useConsumable", bande)
                                Signal.FireServer("removeItem", bande)
                            end
                        end
                        break
                    end
                end
            end)
        end

        -- 自动使用物品
        if autouse and item then
            pcall(function()
                for i, v in next, item.inventory.items do
                    if v.name == 'Green Lucky Block' or v.name == 'Orange Lucky Block' or v.name == 'Purple Lucky Block' or v.name == 'Electronics' or v.name == 'Weapon Parts' then
                        local useid = v.guid
                        Signal.FireServer("equip", useid)
                        Signal.FireServer("useConsumable", useid)
                        Signal.FireServer("removeItem", useid)
                        break
                    end
                end
            end)
        end

        -- 自动售卖
        if autosell and item then
            pcall(function()
                for i, v in next, item.inventory.items do
                    if v.name == 'Amethyst' or v.name == 'Sapphire' or v.name == 'Emerald' or v.name == 'Topaz' or v.name == 'Ruby' or v.name == 'Diamond Ring' or v.name == "Gold Bar" or v.name == "AK-47" or v.name == "AR-15" or v.name == "Diamond" then
                        local sellid = v.guid
                        Signal.FireServer("equip", sellid)
                        Signal.FireServer("sellItem", sellid)
                        break
                    end
                end
            end)
        end

        -- 自动清理
        if autorem and item then
            pcall(function()
                for i, v in next, item.inventory.items do
                    if v.name == 'Uzi' or v.name == 'Baseball Bat' or v.name == 'Basketball' or v.name == 'Bloxaide' or v.name == 'Bloxy Cola' or v.name == 'C4' or v.name == 'Cake' or v.name == 'Stop Sign' then
                        Signal.FireServer("removeItem", v.guid)
                    end
                end
            end)
        end

        -- 自动装备拳头
        if autozb and item then
            pcall(function()
                for i, v in next, item.inventory.items do
                    if v.name == 'Fists' then
                        qtid = v.guid
                        Signal.FireServer("equip", qtid)
                        break
                    end
                end
            end)
        end
    end)
end)

-- 初始通知
Notification:Notify( 
    {Title = "思绪脚本中心付费版", Description = "所有功能已成功加载"}, 
    {OutlineColor = Color3.fromRGB(0, 150, 255),Time = 5, Type = "image"}, 
    {Image = "http://www.roblox.com/asset/?id=4483345998", ImageColor = Color3.fromRGB(0, 150, 255)}
)

StarterGui:SetCore("SendNotification", {
    Title = "思绪脚本中心付费版：",
    Text = "成功加载所有功能",
    Icon = "rbxassetid://119970903874014"
})